package com.hnevc.caoliuye;

import java.util.Scanner;

public class Homework {
    public static void main(String[] args) {
        System.out.println("请输入：");
        Scanner sc = new Scanner(System.in);//键盘输入
        int num = sc.nextInt();
        for (int i = 1; i <= num * 2 - 1; i++) {
            if (i <= num) {
                for (int j = num; j > i; j--) {
                    System.out.print(" ");
                }
                for (int a = 1; a <= i * 2 - 1; a++) {
                    System.out.print("*");
                } } else {
                for (int b = 1; b <= i - num; b++) {
                    System.out.print(" ");
                }
                for (int y = num * 2 - 2; y > (i - num) * 2 - 1; y--) {
                    System.out.print("*");
                }
            }
            System.out.println();//输出
        }
    }
}
